package com.cloud.tio.tiocloud.server;

import com.cloud.tio.tiocloud.models.Friends;
import com.cloud.tio.tiocloud.repository.FriendsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FriendsServer {
    @Autowired
    private FriendsRepository friendsRepository;

    public Friends add(Friends friends) {
        return friendsRepository.save(friends);
    }

    public List<Friends> addAll(List<Friends> friendsList) {
        return friendsRepository.saveAll(friendsList);
    }
}
